.NET Framework Class Library |
TaskFactory<(Of <(TResult>)>) Constructor (CancellationToken) |
TaskFactory<(Of <(TResult>)>) Class See Also Send Feedback |
Initializes a TaskFactory<(Of <(TResult>)>) instance with the default configuration.
Namespace:
System.Threading.Tasks
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New ( _ cancellationToken As CancellationToken _ ) |
C# |
---|
public TaskFactory( CancellationToken cancellationToken ) |
Parameters
- cancellationToken
- Type: System.Threading..::.CancellationToken
The default CancellationToken that will be assigned to tasks created by this TaskFactory unless another CancellationToken is explicitly specified while calling the factory methods.
Remarks
This constructor creates a TaskFactory<(Of <(TResult>)>) instance with a default configuration. The
TaskCreationOptions property is initialized to
TaskCreationOptions.None, the
TaskContinuationOptions property is initialized to TaskContinuationOptions.None,
and the TaskScheduler property is
initialized to the current scheduler (see TaskScheduler.Current).